package com.collectplus.express.model;

import java.io.Serializable;
import java.util.ArrayList;

import droid.frame.utils.lang.Str;

/**
 * Created by joker on 2017/12/29.
 * 同城支付界面返回的数据
 */
public class SameCityOrderBackBean implements Serializable {

    private String orderId;//订单id
    private String parcelId;//包裹id
    private String parcelImgUrl;//包裹图片
    private int parcelType;//包裹类型
    private double weight;//包裹重量
    private String category;//物品描述
    private double distance;//距离
    private SameCityHistoryBean targetVisit;//收件人信息
    private SameCityHistoryBean visit;//寄件人信息
    private SameCityPriceOrderBean priceMap;//包裹价格其他信息
    private SameCityPriceBean cgp;//需要计算的价格规则
    private String cost;// 订单价格
    //邮票相关
    private ArrayList<CouponBean> stampOrders;

    public String getOrderId() {
        return orderId;
    }

    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }

    public String getParcelId() {
        return parcelId;
    }

    public void setParcelId(String parcelId) {
        this.parcelId = parcelId;
    }

    public String getParcelImgUrl() {
        return parcelImgUrl;
    }

    public void setParcelImgUrl(String parcelImgUrl) {
        this.parcelImgUrl = parcelImgUrl;
    }

    public int getParcelType() {
        return parcelType;
    }

    public void setParcelType(int parcelType) {
        this.parcelType = parcelType;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public SameCityHistoryBean getTargetVisit() {
        return targetVisit;
    }

    public void setTargetVisit(SameCityHistoryBean targetVisit) {
        this.targetVisit = targetVisit;
    }

    public SameCityHistoryBean getVisit() {
        return visit;
    }

    public void setVisit(SameCityHistoryBean visit) {
        this.visit = visit;
    }

    public SameCityPriceOrderBean getPriceMap() {
        return priceMap;
    }

    public void setPriceMap(SameCityPriceOrderBean priceMap) {
        this.priceMap = priceMap;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public ArrayList<CouponBean> getStampOrders() {
        return stampOrders == null ? new ArrayList<CouponBean>() : stampOrders;
    }

    public void setStampOrders(ArrayList<CouponBean> stampOrders) {
        this.stampOrders = stampOrders;
    }

    public String getCost() {
        if (Str.isNotEmpty(cost)) {
            return Str.roundByScale(Double.parseDouble(cost), 1);
        } else {
            return cost;
        }
    }

    public void setCost(String cost) {
        this.cost = cost;
    }

    public SameCityPriceBean getCgp() {
        return cgp;
    }

    public void setCgp(SameCityPriceBean cgp) {
        this.cgp = cgp;
    }

    public double getDistance() {
        return distance;
    }

    public void setDistance(double distance) {
        this.distance = distance;
    }
}
